/**
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use "../generated" as gen;

$selected-timeline-ref-color: #1a237e;

:host {
  overflow: hidden;
}

mat-icon {
  width: 18px;
  height: 16px;
  font-size: 16px;
  line-height: 18px;
}

.container {
  background: #f0f0f0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);

  .type {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 5px;
    margin-left: 18px;

    .log-type {
      color: white;
      padding: 0 8px;
      border-radius: 8px;
    }

    .label {
      white-space: nowrap;
      font-weight: bold;
      padding: 0 10px 0 0;
    }

    .spacer {
      margin: 0px;
      margin-left: 10px;
    }

    .severity-type {
      color: white;
      padding: 0 8px;
      border-radius: 8px;
    }
  }
}

.time {
  letter-spacing: 0.3px;
}

.log-type {
  @include gen.log-type-shape-colors-for-all;
}

.severity-type {
  @include gen.log-severity-colors-for-all;
}

.copy-button {
  appearance: none;
  border: none;
  border-radius: 4px;

  &:hover {
    background-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }
}

.resource-ref-title {
  margin: 3px 0px;
  font-weight: 600;
}

.resource-ref-label {
  &::before {
    content: "・";
  }

  margin: 3px 0px 0px 5px;
  white-space: nowrap;
  font-size: smaller;

  &:not(.selectable) {
    font-weight: 600;
    color: $selected-timeline-ref-color;
  }

  &.selectable {
    text-decoration: underline;

    &:hover {
      cursor: pointer;
      text-decoration: none;
    }
  }
}

.resource-ref-wrap {
  max-height: 100px;
  overflow-y: scroll;
}
